<?php get_header(); ?>

<div class="content-area">
	<div class="container">

	<?php get_template_part("template-parts/page-title");?>

	<div class="page-sidebar-wrapper">
		<div class="row">

			<aside id="main-sidebar" class="col-xs-12 col-sm-3 col-sm-push-9">
				<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar-1') ) : ?>
				<?php endif; ?>
			</aside>

			<div class="col-xs-12 col-sm-9 col-sm-pull-3">
						
				<?php //start loop
					if ( $wp_query->have_posts() ) {
						echo '<div class="page-content">';
						
						echo '<div class="articles-wrapper"><div class="row">';
						 while ( $wp_query->have_posts() ) : $wp_query->the_post(); // run the loop
						get_template_part( 'template-parts/category/category');
						endwhile;
						echo '</div></div>';
						
						if ( $wp_query->max_num_pages > 1 ) :
							require( 'pagination.php');
						endif;
						
						echo '</div>';
					}// end loop
					wp_reset_query();
				?>
				
			</div>

		</div>
	</div>

	</div>
</div>

<?php get_footer(); ?>